///**
// * Copyright (c) 2016, 2024, All rights reserved.
// * Powered by [liangyafeng@duplicall.com] On 2024-03-22 16:11:19
// */
//package com.yafengliang.utils;
//
//import javax.sound.sampled.AudioFormat;
//import javax.sound.sampled.AudioSystem;
//import javax.sound.sampled.Mixer;
//
///**
// *
// * <p>Project: SpringBoot - AudioFormatsExample
// * <p>@author liangyafeng@duplicall.com On 2024-03-22 16:11:19
// *
// * @Description
// */
//public class AudioFormatsExample {
//    public static void main(String[] args) {
//        Mixer.Info[] mixerInfos = AudioSystem.getMixerInfo();
//
//        for (Mixer.Info mixerInfo : mixerInfos) {
//            System.out.println("Mixer: " + mixerInfo.getName());
//            Mixer mixer = AudioSystem.getMixer(mixerInfo);
//            javax.sound.sampled.Line.Info[] lineInfos = mixer.getTargetLineInfo();
//
//            for (javax.sound.sampled.Line.Info lineInfo : lineInfos) {
//                System.out.println("  Line: " + lineInfo);
//
//                if (lineInfo.getLineClass().equals(javax.sound.sampled.TargetDataLine.class)) {
//                    javax.sound.sampled.TargetDataLine targetDataLine;
//                    try {
//                        targetDataLine = (javax.sound.sampled.TargetDataLine) mixer.getLine(lineInfo);
//                        AudioFormat[] formats = targetDataLine.getFormats();
//
//                        for (AudioFormat format : formats) {
//                            System.out.println("    Format: " + format);
//                        }
//                    } catch (Exception e) {
//                        e.printStackTrace();
//                    }
//                }
//            }
//        }
//    }
//}
